using Microsoft.CodeAnalysis;
using Microsoft.EntityFrameworkCore;
using ProduceBasicData.Domain.DeviceManage;
using ProduceBasicData.Domain.Entities;
using ProduceBasicData.Domain.FactoryModeling;
using ProduceBasicData.Domain.IncomingMaterialsManage;
using ProduceBasicData.Domain.Inventories;
using ProduceBasicData.Domain.InvoiceAndReceiptManage;

using ProduceBasicData.Domain.Material;
using ProduceBasicData.Domain.ProductionManage;
using ProduceBasicData.Domain.RBAC;
using ProduceBasicData.Domain.WarehouseManage;
using ProduceBasicData.Domain.CodeGeneration;

namespace ProduceBasicData.Infrastructure
{
    public class MyDBContext : DbContext
    {
        public MyDBContext(DbContextOptions options) : base(options)
        {
        }


        //RBAC
        public DbSet<UserModel> users { get; set; }//用户
        public DbSet<RoleModel> roles { get; set; }//角色
        public DbSet<UserRoleModel> userroles { get; set; }//用户角色
        public DbSet<PermissionModel> permissions {  get; set; }//权限
        public DbSet<RolePermissionModel> rolepermissions { get; set; }//角色权限
        public DbSet<DepartmentModel> departments { get; set; }//部门
        public DbSet<DictTypeModel> dicttypes { get; set; }//字典类型
        public DbSet<DictDataModel> dictdatas { get; set; }//字典数据
        public DbSet<OperLogModel> operlogs { get; set; }//系统日志



        //李一帆
        public DbSet<Work_order> work_orders { get; set; }//生产工单管理
        public DbSet<ProductMange> products { get; set; }//产品管理
        public DbSet<Production_report> production_reports { get; set; }//生产报工
        public DbSet<Report_approval> report_approvals { get; set; }//报工审核
        public DbSet<Plan_Scheduling> plan_schedulings { get; set; }//计划排班表
        public DbSet<Report_Record> record { get; set; } //报工记录表
        public DbSet<Nodeinfo> nodes { get; set; }//节点表
        public DbSet<WorkShopOrder> workshoporders { get; set; }//工单车间中间表
        //王依凡
        public DbSet<WorkstationModel> workstations { get; set; }//工位
        public DbSet<ProcessModel> processes { get; set; }//工序
        public DbSet<ProductionModel> productions { get; set; }//产线
        public DbSet<Workshopmodel> workshopmodels { get; set; }//车间

        public DbSet<ClientModel> clients { get; set; }//客户(erp传入)

        public DbSet<NotificationModel> notifications { get; set; } //signalr


        //杨明泽
        public DbSet<BOMInfoModel>   bommodel { get; set; }//BOM
        public DbSet<CraftModel> crafts { get; set; }//工艺路线
        public DbSet<MaterialGroupModel> materialgroup { get; set; }//物料群组
        public DbSet<ProductMaterialModel> productmaterial { get; set; }//产品物料
        public DbSet<MaterialTypeDictionary> materialtypedictionary { get; set; }//物料类型字典
        public DbSet<GroupTypeDictionary> grouptypedictionarie { get; set; }//群组类型字典
        public DbSet<SupplierModel> suppliers { get; set; } //供应商

        public DbSet<IncomingMaterials> incomings { get; set; } //;来料表



        //吴怡
        public DbSet<DeviceType> devicetypes { get; set; }//设备类型
        public DbSet<ProjectMaintenance> projectmaintenances { get; set; }//项目维护
        public DbSet<ProjectForm> projectforms { get; set; }//项目表单
        public DbSet<ProjectFormRelation> projectformrelations { get; set; }//项目表单关系
        public DbSet<IncomingInspection> incominginspections { get; set; }//来料检验
        public DbSet<InspectionScheme> inspectionschemes { get; set; }//检验方案
        public DbSet<Invoice> invoices { get; set; }//开票
        public DbSet<Receipt> receipts { get; set; }//到票
        public DbSet<Warehouse> warehouses { get; set; }//仓库
        public DbSet<WarehouseZone> warehousezones { get; set; }//仓库区域
        public DbSet<StorageLocation> storagelocation { get; set; }//库位
        public DbSet<StockInOrder> stockinorders { get; set; }//入库单
        public DbSet<StockInOrderItem> stockinorderitems { get; set; }//入库单明细
        public DbSet<StockOutOrder> stockoutorders { get; set; }//出库单
        public DbSet<StockOutOrderItem> stockoutorderitems { get; set; }//出库单明细
        public DbSet<Inventory> inventorys { get; set; }//库存

        //编码生成规则
        public DbSet<CodeRule> coderules { get; set; }//编码生成规则


    }

}
